<?php
namespace app\index\controller;

use think\facade\Cache;
use think\facade\Request;
class Index
{
    public function index()
    {
        $user_id = 6;
        $key = $this->get_websocket_token_key($user_id);
        $a = Cache::store('redis')->get($key);

        var_dump($a);
        return "";
    }

    public function hello($name = 'ThinkPHP5')
    {
        echo 222;return ;
        $new = Request::get();
        var_dump($new);
        Cache::set('name',['shu'=>"ds"],3600);
        $res = Cache::get('name');
        return $res['shu'];
    }
    function get_websocket_token_key($id){
        return md5("websocket_token_{$id}");
    }
}
